//
//  APIConfig.m
//  HWZB
//
//  Created by 许成雄 on 2017/4/29.
//  Copyright © 2017年 wonders. All rights reserved.
//

#import "APIConfig.h"

@implementation APIConfig

//服务器地址
static NSString *SERVER_DEFAULT = @"http://121.43.191.95:8080/web";

//部分URL地址
static NSString *USER_LOGIN_URL = @"/memberInfoCtr/newlogin.do";
static NSString *USER_REGISTER_URL = @"/memberInfoCtr/regUser.do";
static NSString *REGISTER_VERIFY_CODE_URL = @"/memberInfoCtr/getSmsVerifyCode.do";
static NSString *FORGET_PASSWORD_URL = @"/memberInfoCtr/updateLoginPwd.do";
static NSString *VERIFY_CODE_URL = @"/memberInfoCtr/getSmsPassword.do";
static NSString *HOME_BANNER_URL = @"/marketHeadSlide/list1.do";
static NSString *HOME_BANNER_DETAIL_URL = @"/marketHeadSlide/getById.do";
static NSString *HOME_COMMODITIES_URL = @"/productInfo/page.do";
static NSString *COMMODITIES_URL = @"/productInfo/page.do";
static NSString *COMMODITY_DETAIL_URL = @"/productInfo/detail.do";
static NSString *COMMIT_ORDER_URL = @"/productBuy/create.do";
static NSString *PAY_URL = @"/productBuy/pay.do";
static NSString *MY_ORDERS_URL = @"/productBuy/page.do";
static NSString *QRCODE_INVITE_URL = @"/tbCustomerRelation/addUpdate.do";
static NSString *USER_INFO_URL = @"/tbCustomerInfo/getById.do";
static NSString *MODIFY_USER_INFO_URL = @"/memberInfoCtr/updateuser.do";
static NSString *ACCOUNT_URL = @"/tbAccountInfo/getById.do";
static NSString *MY_TEAM_URL = @"/tbCustomerRelation/getById.do";
static NSString *WITHDRAW_RECORD_URL = @"/tbGetMoney/page.do";
static NSString *WITHDRAW_URL = @"/tbGetMoney/addUpdate.do";
static NSString *I_GET_URL = @"/tbGetPoint/getPoint.do";
static NSString *USER_LOGOUT_URL = @"/tbGetPoint/logoutSuccess.do";
static NSString *VERSION_UPDATE_URL = @"/memberInfoCtr/updateVersion.do";
static NSString *MODIFY_PASSWORD_URL = @"/memberInfoCtr/updatePwd.do";
static NSString *USER_AGREEMENT_URL = @"/marketHeadSlide/list2.do";
static NSString *ADDRESS_URL = @"/memberInfoCtr/list2.do";
static NSString *BANK_TYPE_URL = @"/tbBankType/list.do";
static NSString *COMMODITY_TYPE_URL = @"/tbProductType/list.do";

#pragma mark - Main URL
+ (NSString *)mainURL {
    return [NSString stringWithFormat:@"%@", SERVER_DEFAULT];
}

#pragma mark - URL
//用户登录
+ (NSString *)userLoginURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], USER_LOGIN_URL];
}

//用户注册
+ (NSString *)userRegisterURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], USER_REGISTER_URL];
}

//验证码
+ (NSString *)registerVerifyCodeURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], REGISTER_VERIFY_CODE_URL];
}

//忘记密码
+ (NSString *)forgetPasswordURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], FORGET_PASSWORD_URL];
}

//验证码
+ (NSString *)verifyCodeURL {
     return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], VERIFY_CODE_URL];
}

//首页banner
+ (NSString *)homeBannerURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], HOME_BANNER_URL];
}

//首页bannner详情
+ (NSString *)homeBannerDetailURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], HOME_BANNER_DETAIL_URL];
}

//首页商品
+ (NSString *)homeCommoditiesURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], HOME_COMMODITIES_URL];
}

//商城商品
+ (NSString *)commoditiesURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], COMMODITIES_URL];
}

//商品详情
+ (NSString *)commodityDetailURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], COMMODITY_DETAIL_URL];
}

//提交订单
+ (NSString *)commitOrderURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], COMMIT_ORDER_URL];
}

//支付订单
+ (NSString *)payURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], PAY_URL];
}

//我的订单
+ (NSString *)myOrdersURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], MY_ORDERS_URL];
}

//扫码邀请
+ (NSString *)qrCodeInviteURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], QRCODE_INVITE_URL];
}

//用户信息
+ (NSString *)userInfoURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], USER_INFO_URL];
}

//修改用户信息
+ (NSString *)modifyUserInfoURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], MODIFY_USER_INFO_URL];
}

//账户信息
+ (NSString *)accountInfoURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], ACCOUNT_URL];
}

//我的团队
+ (NSString *)myTeamURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], MY_TEAM_URL];
}


//提现记录
+ (NSString *)withdrawRecordsURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], WITHDRAW_RECORD_URL];
}

//提现
+ (NSString *)withdrawURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], WITHDRAW_URL];
}

//我要领取
+ (NSString *)iGetURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], I_GET_URL];
}
//设置--修改密码
+ (NSString *)modifyPasswordURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], MODIFY_PASSWORD_URL];
}

//设置--退出登录
+ (NSString *)userLogoutURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], USER_LOGOUT_URL];
}


//版本更新
+ (NSString *)versionUpdateURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], VERSION_UPDATE_URL];
}

//用户协议
+ (NSString *)userAgreementURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], USER_AGREEMENT_URL];
}

//地址
+ (NSString *)addressURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], ADDRESS_URL];
}

//银行字典
+ (NSString *)bankTypeURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], BANK_TYPE_URL];
}

//商品类型
+ (NSString *)commodityTypeURL {
    return [NSString stringWithFormat:@"%@%@", [APIConfig mainURL], COMMODITY_TYPE_URL];
}

@end
